/*
 * Created on 2008-06-08
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package elka.isi.operator.writer;

import org.evolvica.core.IIndividualSet;
import org.evolvica.core.common.ASCIIFileWriter;

public class QuantityAndScoresWriter extends ASCIIFileWriter {

	private PopulationsQuantityWriter quantityWriter;
	private ScoresWriter scoresWriter;
    private GeneticAttributesWriter geneticAttributesWriter;

    public QuantityAndScoresWriter(String scoresFile, String quantityFile, String geneticAttributeFile){
		quantityWriter = new PopulationsQuantityWriter(quantityFile);
		scoresWriter = new ScoresWriter(scoresFile);
        geneticAttributesWriter = new GeneticAttributesWriter(geneticAttributeFile);
    }
	
	public void write(IIndividualSet set) {
		quantityWriter.write(set);
		scoresWriter.write(set);
        geneticAttributesWriter.write(set);
    }
	
	public void close(){
		quantityWriter.close();
		scoresWriter.close();
        geneticAttributesWriter.close();
    }
	
}
